<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="admin/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>借阅管理</title>

    <!--    预览路径 ,可以直接在 IDEA 打开 。如果不导入两遍就预览不了 -->
    <link rel="icon" href="../../static/favicon.ico" type="image/x-icon">
    <!--导入网页图标 -->
    <link rel="shortcut icon" href="../../static/favicon.ico" type="image/x-icon">
    <!--导入网页图标 -->
    <script src="../../static/lib/jQuery/jquery-3.5.1.min.js"></script>
    <!--导入jQuery库 -->
    <script src="../../static/lib/layui/layui.js"></script>
    <!--导入layUI库 -->
    <script src="../../static/lib/cookie/js.cookie-2.2.1.min.js"></script>
    <!--导入cookie库 -->
    <link rel="stylesheet" href="../../static/lib/layui/css/layui.css" media="all">
    <!--导入layUI css库 -->
    <link rel="stylesheet" href="../../static/css/common.css">
    <!--导入公共的css，其中可定义整个网页的配色方案 -->

</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 页面的header -->
    <div th:replace="admin/_fragments :: admin-header" class="layui-header">
        <div class="layui-logo">图书管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a class="layui-icon layui-icon-shrink-right" href="javascript:void(0)"></a>
            </li>
            <!--菜单按钮-->

            <!-- <li class="layui-nav-item"><a href="">控制台</a></li>
            <li class="layui-nav-item"><a href="">图书管理</a></li>
            <li class="layui-nav-item"><a href="">用户</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li> -->

        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:void(0)">
                    <img src="../../static/images/ashini.ico" class="layui-nav-img">
                    啊、是你
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="/admin/login">安全退出</a></li>
        </ul>
    </div>
    <!-- 页面的menu/左边的导航栏 -->
    <div th:replace="admin/_fragments :: admin-menu" id="div_side_bg" class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a class="" href="javascript:void(0)">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:void(0)">用户列表</a></dd>
                        <dd><a href="javascript:void(0)">权限列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item  layui-nav-itemed">
                    <a href="javascript:void(0)">图书管理</a>
                    <dl class="layui-nav-child">
                        <dd class="layui-this"><a href="javascript:void(0)" th:href="@{/admin/book-list}">图书列表</a></dd>
                        <dd><a href="javascript:void(0)">图书类别列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:void(0)">借阅管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:void(0)">列表一</a></dd>
                        <dd><a href="javascript:void(0)">列表二</a></dd>
                        <dd><a href="javascript:void(0)">列表三</a></dd>
                    </dl>
                </li>
                <!--                    <li class="layui-nav-item"><a href="">云市场</a></li>-->
                <!--                    <li class="layui-nav-item"><a href="">发布商品</a></li>-->
            </ul>
        </div>
    </div>
    <div class="layui-body" lay-filter="returnRecord">
        <!-- 内容主体区域 -->
        <div style="width: 100%;height:98%;padding-left: 15px;padding-top: 10px;">
            <!-- 面包屑-->
            <span class="layui-breadcrumb" lay-separator=" | ">
                <a href="/admin/index">首页</a>
                <a href="/returnRecord/admin/returnRecord-list">借阅管理</a>
                <a><cite>添加还书记录</cite></a>
            </span>
            <form class="layui-form layui-form-pane" style="margin-top: 10px;" action="" th:object="${returnRecord}" th:action="@{/returnRecord/admin/updateReturnRecord}">
                <div class="layui-form-item">
                    <label class="layui-form-label" th:style="${returnRecord.returnId==null} ? 'display: none' : ''">还书单号</label>
                    <div class="layui-input-block">
                        <input  name="returnId" th:type="${returnRecord.returnId!=null?'':'hidden'}"
                                th:value="${returnRecord.returnId!=null?returnRecord.returnId:'-1'}"
                                th:readonly="true"
                                autocomplete="off" class="layui-input" style="width: 1000px">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">读者编号</label>
                    <div class="layui-input-block">
                        <input type="text" name="user.userId" th:value="${returnRecord.user!=null?returnRecord.user.userId:''}" lay-verify="title"  autocomplete="off" placeholder="请输入用户ID" class="layui-input">
                    </div>
                </div>
                <!--<div class="layui-form-item">
                    <label class="layui-form-label">读者名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="user.username" th:value="${returnRecord.user!=null?returnRecord.user.username:''}" lay-verify="title"  autocomplete="off" placeholder="请输入用户名" class="layui-input">
                    </div>
                </div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">书籍编号</label>
                    <div class="layui-input-block">
                        <input name="book.bookId" type="text" th:value="${returnRecord.book!=null?returnRecord.book.bookId:''}"
                               lay-verify="title"  autocomplete="off" placeholder="请输入书籍编号" class="layui-input">
                    </div>
                </div>
                <!--<div class="layui-form-item">
                    <label class="layui-form-label">书籍名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="book.bookName" th:value="${returnRecord.user!=null?returnRecord.book.bookName:''}" lay-verify="title"  autocomplete="off" placeholder="请输入书籍名称" class="layui-input">
                    </div>
                </div>-->
                <div class="layui-inline">
                    <label class="layui-form-label">借阅日期</label>
                    <div class="layui-input-inline">
                        <input name="rentTime" id="rentTime" lay-verify="required"
                               th:disabled="${returnRecord.rentTime}!=null?'true':'false'"
                               th:value="${returnRecord.rentTime}"
                               placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input"
                        >
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">还书日期</label>
                    <div class="layui-input-inline">
                        <input name="returnTime"  id="returnTime" lay-verify="required"
                               th:value="${returnRecord.returnTime}"
                               placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item" style="margin-top: 17px">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn" lay-submit="">确认</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>

            </form>

        </div>
    </div>

    <div th:replace="admin/_fragments :: admin-footer" class="layui-footer">
        <!-- 底部固定区域 -->
        ©2020 版权归武汉理工大学计算机1702"我都行，你们商量吧"小组所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span style="color:rgb(144, 145, 146)">
                技术支持：https://www.layui.com/
            </span>
    </div>
</div>


<!--导入公共的js，其中实现了菜单按钮的点击事件-->
<script src="../../static/js/common.js" th:src="@{/js/common.js}"></script>

<!-- layUI执行脚本 -->
<script>
    layui.use(['element', 'form', 'laydate'], function () {
        var form = layui.form;
        var element = layui.element;
        var laydate=layui.laydate;
        laydate.render({
            elem:'#rentTime',
            trigger: 'click',
            format:"yyyy-MM-dd HH:mm:ss.s"
        });
        laydate.render({
            elem:'#returnTime',
            trigger: 'click',
            format:"yyyy-MM-dd HH:mm:ss.s"
        });
        //toDo

    });
</script>


<!--author : 计算机1702  zhao fan -->
</body>

</html>